Skip to content

fix(settings): translate the five Access policy field helps in every locale - #35360

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34121-access-policy-helps
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34121-access-policy-helps

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #34121

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:系统设置 → 访问策略 页面上 5 个字段(允许的 IP 范围、闲置超时、会话最长有效期、每用户最大同时会话数、要求多因素认证)的说明文字,在全部 10 个非英文语言包里补上了译文;覆盖检查里暂记这 5 项的 HELP_OWED 名单清空。
  • 为什么改:此前任何非英文界面下,这 5 个字段的说明都退回显示英文原文,管理员读不懂限制规则(比如“只能比部署更严”“0 表示沿用部署”)。
  • 风险与回滚:只改翻译文本与一个测试名单,不动键名、标签、选项值或任何运行逻辑;回滚即还原本 PR。
  • 先看:packages/services/service-settings/src/translations/zh-CN.ts(access_policy.keys 下 5 条 help,核对语义是否与英文一致);settings-translation-coverage.test.ts(HELP_OWED 清空、只减不增的检查仍在);任一其他语种文件抽查。
  • 两分钟验证:pnpm --filter @objectstack/service-settings exec vitest run --maxWorkers=2 src/translations/settings-translation-coverage.test.ts,预期 150 条全过;或切到中文界面打开 系统设置 → 访问策略,5 个字段下方应为中文说明。
  • 需要你做的:无,席位落地。

What changes

  • packages/services/service-settings/src/translations/{zh-CN,zh-Hant,ja-JP,ko,de,es-ES,fr,pt-BR,ru,ar}.ts: each locale's settings.access_policy.keys gains a help for allowed_ip_ranges, session_idle_timeout_minutes, session_absolute_max_hours, max_concurrent_sessions_per_user and mfa_required, written from the English manifest description of each key and using the terms the locale already uses on this page and on the auth twins (deployment, organization, member, session, grace period). The mfa_required help names the locale's own Off option label. zh-Hant is hand-written in this package (no generator owns these files), so it was written directly, in Traditional terms (工作階段, 登入, 驗證).
  • settings-translation-coverage.test.ts: HELP_OWED is now {}. The shrink-only pin ("every owed help entry is a described field that some locale still leaves untranslated") stays in place, so any future entry is held to the same rule.
  • .changeset/34121-access-policy-field-helps.md: @objectstack/service-settings patch (the locale files ship in dist).

No keys, labels, option values or runtime code change; en.ts is untouched (the English help is the manifest description, as for every other described field).

Tests

  • pnpm --filter @objectstack/service-settings test at head 3f97eb6433: Test Files 76 passed (76), Tests 1516 passed (1516); typecheck clean (lock VERDICT command-exit 0).
  • Ablation, one help removed: node scripts/ablation-replace.mjs renamed the zh-CN mfa_required help key (anchor 1 to 0, blob cd502448eda1 to d91b126ff083); the coverage file went red with exactly one failure, zh-CN missing for access_policy: key:mfa_required.help (1 failed, 149 passed); restore verified by blob equal to HEAD and git diff HEAD empty. The test imports the locale files from source (./index.js), so no build sits between the mutation and the run.

Acceptance notes

  • The zh-CN access_policy labels (outside this card's keys' help) still use half-width parentheses, for example 闲置超时(分钟); the full-width punctuation pin covers only settings.auth. Noted, not filed.

Verification

Derived gate families (dispatch-gates, 64 commands)

Run on 0a8ebf8084 (the fix commit, before the one merge of origin/main): 63 exit 0; pnpm check:dual-build-cjs-loads exit 3, PREREQUISITE NOT MET (reads every package's dist, and this worktree built only the service-settings closure), so NOT MEASURED locally; CI runs it. dispatch-gates --ran reconciliation: 64 derived, 63 run, 1 NOT-MEASURED, 0 UNRUN.

After merging origin/main (`16d3abc41d`) into the branch

The merge touched no service-settings file; packages/spec moved (validation-message), so spec was rebuilt and the service-settings suite re-run on 3f97eb6433 (results above). overlap-check: merges cleanly with origin/main and with #34223, VERDICT clean.

The wide app-shell run and the full CI farm are left to CI.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…locale

The settings.access_policy keys allowed_ip_ranges, session_idle_timeout_minutes,
session_absolute_max_hours, max_concurrent_sessions_per_user and mfa_required
had no help copy in the ten translated locales, so the console fell back to
the English manifest description. Each locale now carries the five helps, and
the coverage test's shrink-only HELP_OWED list is empty.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs.

What this run could not see

Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 3819afeca1307a2c1095ff4abe2eeaa6871d1b2a → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: 3f97eb6433eff8ecc96b77c760c7ad54141cdfd6 · 2026-11-19T06:33Z

  • CI on this head: 37 success, 16 skipped, 0 failed or pending.
  • Diff 230 lines (12 files: ten translated locales, the coverage test, a changeset): above the 50-line self-landing bar, so the L1-a thread reads it. Translation text + test only; Clause-②: no · Metadata-protocol: none.
  • HELP_OWED emptied, shrink-only pin intact; ablation (one zh-CN help renamed) red with exactly the expected message, restored blob == HEAD (os-dev report 7001329079). check:dual-build-cjs-loads NOT MEASURED locally (needs every dist), CI covers it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:系统设置的「访问策略」页面上,IP 范围、闲置超时、会话最长时长、单人同时会话数、强制多因素认证这五项下面的说明,在十种非英文界面里都换成了本地语言。
  • 为什么做:之前这五段说明在任何语言下都显示英文,管理员看不懂限制规则。
  • 出错会怎样:只影响说明文字;设置本身、保存规则都不变。最坏情况是某段译文措辞不够准确。
  • 要你做什么:不需要你做任何事,区域审完自己落地。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head 3f97eb6433eff8ecc96b77c760c7ad54141cdfd6 · 2026-11-19T06:35Z

  • 形态 — 12 files, +181/−49 (230 lines): the ten translated service-settings locale bundles, settings-translation-coverage.test.ts, one changeset. Base 16d3abc4, main moved K=5 first-parent commits (< 15, no merge needed). check-governed-merges.mjs --pr 35360: not governed, under the 3000-line limit. Clause-②: no, Metadata-protocol: none — no L2 face.
  • Fixes vs card Setup Access policy: five field helps show English in every translated locale #34121 — each of ar, de, es-ES, fr, ja-JP, ko, pt-BR, ru, zh-CN, zh-Hant adds exactly five settings.access_policy.keys.KEY.help entries (counted per file), for allowed_ip_ranges, session_idle_timeout_minutes, session_absolute_max_hours, max_concurrent_sessions_per_user, mfa_required. Read de and zh-CN against access-policy.manifest.ts descriptions: each clause is carried (deployment ceilings, 0 / empty / Off fallbacks, the save-address rule, platform-admin carve-out, the two-factor prerequisite); no rule added or dropped. Labels and mfa_required.options are unchanged. HELP_OWED is now {} with its shrink-only pin left in place, as the card's ask allows.
  • Ablation — the help check in missingFor now applies to every described key (the HELP_OWED exemption matches nothing), so removing any one of the fifty helps reports key:KEY.help for that locale and reds the coverage test. Read from the code, not re-run.
  • Changeset — @objectstack/service-settings patch, read sentence by sentence against the diff: the five field names, the English-fallback cause, the ten locales listed, the help path, the empty owed list and "no keys, labels or option values change" all match.
  • 门禁 — 53 check-runs on this head: 37 success, 16 skipped (UI/docs/opt-in jobs path-filtered out), 0 failure. Test Core 10/10 shards green. Mergeable clean.
  • 接受的偏差 — none.
  • 范围外去向 — none found.
  • 落地条款 — not governed: ux-1 lands this head after this ACCEPT. A new push needs a fresh L1 only if it changes more than a main merge.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-19T06:35Z

Reading Value
check-governed-merges --pr 35360 not governed, 230 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 5 (< 15)

ACCEPT 7001757297 (L1-a) at head 3f97eb6433eff8ecc96b77c760c7ad54141cdfd6. Ready + auto-merge now. #34121 closes on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 06:36
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 37e7fdf Nov 19, 2026
54 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34121-access-policy-helps branch November 19, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Access policy: five field helps show English in every translated locale

2 participants